1. Field of the Invention
The present invention generally relates to methods and systems for managing styles and style sheets in electronic documents such as, for example, HTML documents.
2. Description of the Related Art
HTML (Hyper Text Markup Language) tags were originally designed to define the appearance of electronic documents. Their function is to denote the formatting of elements within a document, such as headers, paragraphs and tables using tags such as <h1>, <p>, <table>, respectively. However, as the two major browsers (Netscape and Internet Explorer) continued to add new HTML tags and attributes (such as the <font> tag and the color attribute) to the original HTML specification, it has become more and more difficult to create Web sites where the content of HTML documents was clearly separated from the document's presentation layout.
To solve this problem, the World Wide Web Consortium (W3C)—the non-profit, standard setting consortium responsible for standardizing HTML—created STYLES in addition to HTML 4.0. Beginning with version 4.0, both the Netscape and Internet Explorer browsers began supporting Cascading Style Sheets (CSS). CSS Styles in HTML 4.0 define how HTML elements are displayed, just like the font tag and the color attribute in HTML 3.2. CSS Styles are normally saved in files that are external to the HTML documents whose styles they control. Indeed, external style sheets enable the appearance and layout of all the pages in a Web site that reference the external style sheet to be changed, just by editing a single CSS document. For example, the font or color of all the headings in all of the pages of a Web site may be changed by making a single change to an external style sheet, thereby obviating the need to edit each and every page to effectuate the desired font and heading changes.
Problems arise, however, when data administrators are faced with defining, implementing, enforcing and maintaining CSS style standards for a complex Web site. To avoid hard coding CSS styles into the static or dynamic Web pages, CSS styles sheets are normally saved as external files. This enables the developers to implement stylesheets based on the need. However, precisely because these stylesheets are hard coded, implementing stylistic changes requires a great deal of effort and typically delays the release of new versions. To free the content owners of the need to implement such stylistic changes themselves, the stylesheets may be maintained by developers rather than content owners. However, this decreases the ability of content owners to flexibly and dynamically define the look and feel of their content. Since the content owners have no access to define the style sheets, they often resort to various ad hoc methods to locally hardcode styles into their static Web pages. Over time, this may lead to an inconsistent look and feel throughout the Web
Therefore, the problems encountered during development and maintenance of Web sites or applications include high maintenance, difficulty in understanding how stylistic changes are implemented on the part of content owners, project delays occasioned by the necessity of having to revise the site or application to achieve a consistent look and feel, little or no reuse of style sheets and no reporting feature to ascertain which styles are used in which style sheets and which style sheets are used in which documents.
Tools exist that enable the creation of external style sheets. However, such tools only help in creating external style sheets but do not resolve the above-identified problems. There is a need, therefore, for methods and systems for intelligently managing style sheets, styles and associated attributes to enable content owners themselves to achieve a consistent look and feel to their Web sites and applications, to allow ready re-use of previously defined styles and style sheets, among other functions.